<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery-3.2.1.min.js"></script>
<body>
    <table>
        <tr>
            <td><input name="cheAll" type="checkbox"></td>
            <td></td>
        </tr>
    </table>
</body>
<script>
    for(var i=0;i<10;i++){
        $('table').append('<tr>' +
            '<td><input name="che" type="checkbox"></td>' +
            '<td>obj'+ i +'</td>'+
            '</tr>')
    }


    $('[name="cheAll"]').click(function(){
        console.log(this.checked);
//        console.log($('input[name="cheAll"]').attr('checked'))
//       $('[name="che"]').attr('checked',this.checked);
//       for(var i=0;i<$('[name="che"]').length;i++){
//           $('[name="che"]').eq(i).attr('checked',this.checked);
//           console.log($('[name="che"]').eq(i).attr('checked'))
//       }
        $(':checkbox').attr('checked',this.checked);
    })

    $('[name="che"]:checkbox').click(function(){
    })

</script>
</html>